package ${domain}.action.ajax.wsys;

import org.springframework.beans.factory.annotation.Autowired;
import ${domain}.frame.auth.LocalData;
import ${domain}.module.wsys.mgr.TokensManager;
import ${domain}.module.wsys.req.TokensCreateRequest;
import ${domain}.module.wsys.req.TokensDeleteRequest;
import ${domain}.module.wsys.req.TokensFindRequest;
import ${domain}.module.wsys.req.TokensLogoutRequest;
import ${domain}.module.wsys.req.TokensUpdateRequest;
import ${domain}.module.wsys.rsp.TokensCreateResponse;
import ${domain}.module.wsys.rsp.TokensDeleteResponse;
import ${domain}.module.wsys.rsp.TokensFindResponse;
import ${domain}.module.wsys.rsp.TokensLogoutResponse;
import ${domain}.module.wsys.rsp.TokensUpdateResponse;

public class TokensAjax {

    @Autowired
    private TokensManager tokensManager;

    public TokensCreateResponse create(TokensCreateRequest request) {
        return tokensManager.create(request, LocalData.getToken());
    }

    public TokensDeleteResponse delete(TokensDeleteRequest request) {
        return tokensManager.delete(request, LocalData.getToken());
    }

    public TokensUpdateResponse update(TokensUpdateRequest request) {
        return tokensManager.update(request, LocalData.getToken());
    }

    public TokensFindResponse find(TokensFindRequest request) {
        return tokensManager.find(request, LocalData.getToken());
    }

    public TokensLogoutResponse logout(TokensLogoutRequest request) {
        return tokensManager.logout(request, LocalData.getToken());
    }
}
